import { request } from '@utils/http'
// 请求参数接口
import type { ReqHospitalParams,ResponseHospitalSet,PostHospitalSet,HospitalSet } from './model/hospitalSetTypes'
export function getHospitalSetList({ page, limit, hosname, hoscode }: ReqHospitalParams) {
    return request.get<any,ResponseHospitalSet>(`/admin/hosp/hospitalSet/${page}/${limit}`,{
        params:{
            hosname,
            hoscode
        }
    })
}

/**
 * 添加医院设置api
 */
export function addHospitalSet(payload:PostHospitalSet){
    return request.post<any,null>('/admin/hosp/hospitalSet/save',payload)
}

/**
 * 根据id获取医院设置数据
 */
export function getHospitalSetById(id:string){
    return request.get<any,HospitalSet>('/admin/hosp/hospitalSet/get/' + id)
}

/**
 * 更新医院
 */
export function updateHospitalSet(hospitalSet:HospitalSet){
    return request.put<any,null>('/admin/hosp/hospitalSet/update',hospitalSet)
}